// ==========================
// Segment
// ==========================
function Segment(name, view, marginOut, stride) {
    this.mId = name;

    if (view instanceof Array) {
        this.mSize = view.length;
        this.mView = view;
    } else {
        this.mSize = 1;
        this.mView = [view];
    }
    this.mMarginOut = marginOut;// part that is not visiable, from center to visiable
    this.mStride = stride;
}
Segment.prototype.getId = function () {
    return this.mId;
};
Segment.prototype.getMarginOut = function () {
    return this.mMarginOut;
};
Segment.prototype.stride = function () {
    return this.mStride;
};
Segment.prototype.size = function () {
    return this.mSize;
};
Segment.prototype.getView = function (index) {
    return this.mView[index];
};

module.exports = Segment;